package com.ipc.core.dao.gwl.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ipc.common.pojo.bo.gwl.SSDBo;
import com.ipc.common.pojo.bo.gwl.SecondScreenDetailBo;
import com.ipc.core.entity.gwl.SecondScreenDetail;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 三级诱导屏详情(SecondScreenDetail)表数据库访问层
 *
 * @author 高万里
 * @since 2023-05-02 09:51:50
 */
public interface SecondScreenDetailDao extends BaseMapper<SecondScreenDetail> {

    //根据编号查询编号是否存在
   // String getNo(@Param("no") String no);

    //根据姓名模糊查询所有数据
    @Select("select sc.id,sc.content, sc.direction, sc.distance, sc.direction, sc.sort,\n" +
            "       p.sum, p.count\n" +
            "       from t_second_screen_detail sc left join t_park p on sc.park_id = p.id\n" +
            "        where second_id = #{id}")
     List<SecondScreenDetailBo> selectAll(int id);

    @Select("select id, name from t_park" +
            " <where>" +
            "<if >" +
            "</where>")
    List<SSDBo> selectAllPark(int id);
}

